package com.ccrfid.rmc6.repository.business.prison.rollcall;

import com.ccrfid.rmc6.entity.business.prison.rollcall.PrisonRollcallResultEntity;
import com.ccrfid.rmc6.repository.search.SearchableRepository;
import org.springframework.data.repository.Repository;

import java.sql.Time;
import java.sql.Timestamp;

public interface PrisonRollcallResultRepository extends Repository<PrisonRollcallResultEntity, Long>,
        SearchableRepository<PrisonRollcallResultEntity> {
    //
    PrisonRollcallResultEntity save(PrisonRollcallResultEntity entity);
    //
    Boolean existsByPoliceIdAndPlaceIdAndTaskTimeAndRollcallTime(Long policeId, Long placeId, Time taskTime, Timestamp rollcallTime);

    PrisonRollcallResultEntity getByPoliceIdAndPlaceIdAndTaskTimeAndRollcallTime(Long policeId, Long placeId, Time taskTime, Timestamp rollcallTime);
}
